using System;
using System.Collections;
using System.Text;

namespace bOS.XML
{
	public class XMLNodes : CollectionBase
	{
		public int Add (XMLNode node)
		{
			return this.List.Add (node);
		}

		public XMLNode this[ int index ]  
		{
			get  
			{
				return( (XMLNode) List[index] );
			}
			set  
			{
				List[index] = value;
			}
		}

		public string GetXML(bool bIndent, int iLevel)
		{
			StringBuilder sbXml= new StringBuilder();

			for ( int i=0; i<List.Count;i++)
			{
				XMLNode node = this[i];

				sbXml.Append (node.GetXML(bIndent, iLevel));
			}

			return sbXml.ToString();
		}
	}
}
